{template header}

<link href="{SITE_URL}public/js/dropzone/dropzone.css" type="text/css" rel="stylesheet" />
<script src="{SITE_URL}public/js/dropzone/dropzone.js"></script>

<div class="container">

<ol class="breadcrumb">
  <li><a href="{SITE_URL}">首页</a></li>
  <li><a href="{tsUrl('photo')}">相册</a></li>
  <li class="active">上传图片</li>
</ol>


<div class="panel panel-default">
  <div class="panel-body">

{template menu}

<h1>上传照片 - {$strAlbum[albumname]}</h1>

<div style="padding:0 10px;">

<div class="alert alert-info">上传文件只支持：jpg，gif，png格式。</div>



  <form id ="myAwesomeDropzone" style="width:100%;" action="{SITE_URL}index.php?app=photo&ac=upload&ts=do" class="dropzone">
    <input type="hidden" name="albumid" value="{$albumid}">
    <input type="hidden" name="addtime" value="{$addtime}"/>
  </form>


</div>

</div>
</div>


</div>
<script>
    Dropzone.options.myAwesomeDropzone = {
        paramName: "file", // The name that will be used to transfer the file
        maxFilesize: 2, // MB
        acceptedFiles:".jpg,.gif,.png,.jpeg",
        accept: function(file, done) {
            if (file.name == "justinbieber.jpg") {
                done("Naha, you don't.");
            } else {
                done();
            }
        },
        complete:function (file) {
            window.location = siteUrl+"index.php?app=photo&ac=album&ts=info&albumid={$albumid}&addtime={$addtime}";
        }

    };
</script>
{template footer}